{extends file="index.tpl"} 
{block name="page-content"}
{literal}
<script type="text/javascript">
$(document).ready(function() {
	$('input[name="name"]').blur(function() {
		var name=$('input[name="name"]').val();
		$.ajax({
			type: "GET",
			url: "http://thanhphogame.com/admin/controller/process/ajaxCheckName.php?name="+name,
			data: { name: name }
		}).done(function(res) {
			if (res == 1){
				$('#name').css({"border-color": "red"});
			} else {
				$('#name').css({"border-color": "#CCC"});
			}
		});                   
	});
	
	$('input[id="nameC"]').blur(function() {
		var name=$('input[id="nameC"]').val();
		$.ajax({
			type: "GET",
			url: "http://thanhphogame.com/admin/controller/process/ajaxCheckNameCGMB.php?name="+name,
			data: { name: name }
		}).done(function(res) {
			if (res == 1){
				$('#nameC').css({"border-color": "red"});
			} else {
				$('#nameC').css({"border-color": "#CCC"});
			}
		});                   
	});

	$('input[id="nameM"]').blur(function() {
		var name=$('input[id="nameM"]').val();
		$.ajax({
			type: "GET",
			url: "http://thanhphogame.com/admin/controller/process/ajaxCheckNameMMBG.php?name="+name,
			data: { name: name }
		}).done(function(res) {
			if (res == 1){
				$('#nameM').css({"border-color": "red"});
			} else {
				$('#nameM').css({"border-color": "#CCC"});
			}
		});                   
	});
});          
</script>
{/literal}
	<div class="row-fluid">
		<div class="span12">
		<div class="block">
			<div class="head">
				<h2>Thêm Danh Mục Game</h2>
				<ul class="buttons">
					<li>
						<a href="#" onClick="source('tabs'); return false;">
							<div class="icon">
								<span class="ico-info"></span>
							</div> 
						</a>
					</li>
				</ul>
			</div>
			<div class="data-fluid tabbable">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#tab1" data-toggle="tab">Thành Phố Game</a></li>
					<!-- <li><a href="#tab2" data-toggle="tab">Chơi Game Mobi</a></li> -->
					<li><a href="#tab3" data-toggle="tab">My Mobi Game</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="tab1">
						<form id="validate" method="POST" action="{$WEB_BASE_URL}/index.php?controller=gameCategory&action=add&data=tpg">
							<div class="data-fluid">
								<div class="row-form">
									<div class="span2">Loại Game</div>
									<div class="span10">
										<select name="loaigame" class="select" style="width: 100%;">
											<option value="2">Game Online</option>
											<option value="3">Game Offline</option>
											<option value="4">Game Web</option>
											<option value="156">Game Mod</option>
											<option value="78">Game Kinh Điển</option>
										</select>
									</div>
								</div>
							
								<div class="row-form">
									<div class="span2">Parent:</div>
									<div class="span10">
										<select name="parent" class="select" style="width: 100%;" >
											<option value="0">--- Chọn Parent ---</option>
											<option value="2">Game Online</option>
											<option value="3">Game Offline</option>
											<option value="4">Game Web</option>
											<option value="156">Game Mod</option>
											<option value="78">Game Kinh Điển</option>
										</select>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Name</div>
									<div class="span10">
										<input type="text" class="validate[required]" name="name" id="name" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Image</div>
									<div class="span10">
										<input type="text" class="validate[required]" name="image" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">XLarge Image</div>
									<div class="span10">
										<input type="text" name="xlargeImage" />
									</div>
								</div>  
								
								<div class="row-form">
									<div class="span2">SEO_metaDescription</div>
									<div class="span10"><textarea name="SEO_metaDescription" placeholder="Placeholder example" class="validate[required]"></textarea></div>
								</div>
								<div class="row-form">
									<div class="span2">SEO_keyword</div>
									<div class="span10"><input name="SEO_keyword" type="text" class="tags"/></div>
								</div>
								<div class="row-form">
									<div class="span2">linkMWork</div>
									<div class="span10">
										<input type="text" name="linkMWork" id="linkMWork" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Hot Star:</div>
									<div class="span10">
										<select name="hot_star" class="select" style="width: 100%;">
											<option value="0">Ẩn</option>
											<option value="5">Hiện</option>
										</select>
									</div>
								</div>
								<div class="row-form">
		                            <div class="span2">Game Favorite</div>
		                            <div class="span10">
		                                <input type="text" name="isFavorite" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
								<div class="row-form">
		                            <div class="span2">Is New</div>
		                            <div class="span10">
		                                <input type="text" name="isNew" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
		                        <div class="row-form">
		                            <div class="span2">Is Pop</div>
		                            <div class="span10">
		                                <input type="text" name="isPop" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
		                        <div class="row-form">
		                            <div class="span2">Rank</div>
		                            <div class="span10">
		                                <input type="text" name="rank" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
								<div class="toolbar bottom tar">
									<div class="btn-group">
										<button class="btn btn-info" type="button" onClick="$('#validate').validationEngine('hide');">Hide prompts</button>
		                                <button class="btn" type="submit">Thêm Game Category</button>
		                            </div>
		                       	</div>
							</div>
						</form>
					</div>
					<!-- <div class="tab-pane" id="tab2">
						<form id="validate" method="POST" action="{$WEB_BASE_URL}/index.php?controller=gameCategory&action=add&data=cgmb">
							<div class="data-fluid">
								<div class="row-form">
									<div class="span2">Loại Game</div>
									<div class="span10">
										<select name="loaigame" class="select" style="width: 100%;">
											<option value="2">Game Online</option>
											<option value="3">Game Offline</option>
											<option value="4">Game Web</option>
											<option value="156">Game Mod</option>
											<option value="78">Game Kinh Điển</option>
										</select>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Kiểu Game Kinh Điển</div>
									<div class="span10">
										<select name="kieugame" class="select" style="width: 100%;">
											<option value="0" >--Chọn kiểu game kinh điển--</option>
											{foreach from=$gamekinhdienArr item=gamekinhdien}
											<option value="{$gamekinhdien.name}" >{$gamekinhdien.name}</option>
		                                    {/foreach}
										</select>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Parent:</div>
									<div class="span10">
										<select name="parent" class="select" style="width: 100%;">
											<option value="0">--- Chọn Parent ---</option>
											<option value="2">Game Online</option>
											<option value="3">Game Offline</option>
											<option value="4">Game Web</option>
											<option value="156">Game Mod</option>
											<option value="78">Game Kinh Điển</option>
										</select>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Name</div>
									<div class="span10">
										<input type="text" class="validate[required]" name="name" id="nameC" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Image</div>
									<div class="span10">
										<input type="text" class="validate[required]" name="image" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">XLarge Image</div>
									<div class="span10">
										<input type="text" name="xlargeImage" />
									</div>
								</div>  
								
								<div class="row-form">
									<div class="span2">SEO_metaDescription</div>
									<div class="span10"><textarea name="SEO_metaDescription" placeholder="Placeholder example" class="validate[required]"></textarea></div>
								</div>
								<div class="row-form">
									<div class="span2">SEO_keyword</div>
									<div class="span10"><input name="SEO_keyword" type="text" class="tags"/></div>
								</div>
								
								<div class="row-form">
									<div class="span2">Hot Star:</div>
									<div class="span10">
										<select name="hot_star" class="select" style="width: 100%;">
											<option value="0">Ẩn</option>
											<option value="5">Hiện</option>
										</select>
									</div>
								</div>
								
								<div class="row-form">
		                            <div class="span2">Is New</div>
		                            <div class="span10">
		                                <input type="text" name="isNew" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
		                        <div class="row-form">
		                            <div class="span2">Is Pop</div>
		                            <div class="span10">
		                                <input type="text" name="isPop" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
		                        <div class="row-form">
		                            <div class="span2">Rank</div>
		                            <div class="span10">
		                                <input type="text" name="rank" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
								<div class="toolbar bottom tar">
									<div class="btn-group">
										<button class="btn btn-info" type="button" onClick="$('#validate').validationEngine('hide');">Hide prompts</button>
		                                <button class="btn" type="submit">Thêm Game Category</button>
		                            </div>
		                       	</div>
							</div>
						</form>
					</div>-->
					<div class="tab-pane" id="tab3">
					<strong>MYMOBIGAME</strong>
						<form id="validate" method="POST" action="{$WEB_BASE_URL}/index.php?controller=gameCategory&action=add&data=mmbg">
							<div class="data-fluid">
								<div class="row-form">
									<div class="span2">Loại Game</div>
									<div class="span10">
										<select name="loaigame" class="select" style="width: 100%;">
											<option value="2">Game Online</option>
											<option value="3">Game Offline</option>
											<option value="4">Game Web</option>
											<option value="156">Game Mod</option>
											<option value="78">Game Kinh Điển</option>
										</select>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Parent:</div>
									<div class="span10">
										<select name="parent" class="select" style="width: 100%;">
											<option value="0">--- Chọn Parent ---</option>
											<option value="2">Game Online</option>
											<option value="3">Game Offline</option>
											<option value="4">Game Web</option>
											<option value="156">Game Mod</option>
											<option value="78">Game Kinh Điển</option>
										</select>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Name</div>
									<div class="span10">
										<input type="text" class="validate[required]" name="name" id="nameM" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Image</div>
									<div class="span10">
										<input type="text" class="validate[required]" name="image" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">XLarge Image</div>
									<div class="span10">
										<input type="text" name="xlargeImage" />
									</div>
								</div>  
								<div class="row-form">
									<div class="span2">SEO_metaDescription</div>
									<div class="span10"><textarea name="SEO_metaDescription" placeholder="Placeholder example" class="validate[required]"></textarea></div>
								</div>
								<div class="row-form">
									<div class="span2">SEO_keyword</div>
									<div class="span10"><input name="SEO_keyword" type="text" class="tags"/></div>
								</div>
								<div class="row-form">
									<div class="span2">linkMWork</div>
									<div class="span10">
										<input type="text" name="linkMWork" id="linkMWork" /> 
										<span class="bottom">Required</span>
									</div>
								</div>
								<div class="row-form">
									<div class="span2">Hot Star:</div>
									<div class="span10">
										<select name="hot_star" class="select" style="width: 100%;">
											<option value="0">Ẩn</option>
											<option value="5">Hiện</option>
										</select>
									</div>
								</div>
								<div class="row-form">
		                            <div class="span2">Game Favorite</div>
		                            <div class="span10">
		                                <input type="text" name="isFavorite" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
								<div class="row-form">
		                            <div class="span2">Is New</div>
		                            <div class="span10">
		                                <input type="text" name="isNew" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
		                        <div class="row-form">
		                            <div class="span2">Is Pop</div>
		                            <div class="span10">
		                                <input type="text" name="isPop" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
		                        <div class="row-form">
		                            <div class="span2">Rank</div>
		                            <div class="span10">
		                                <input type="text" name="rank" class="validate[custom[integer]]"/>
		                            </div>
		                        </div>
								<div class="toolbar bottom tar">
									<div class="btn-group">
										<button class="btn btn-info" type="button" onClick="$('#validate').validationEngine('hide');">Hide prompts</button>
		                                <button class="btn" type="submit">Thêm Game Category</button>
		                            </div>
		                       	</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		
	</div>
	
</div>

{/block}


